package day7.Exer;

public class Teacher {
    private String name;
    private int age;
    private String sex;
    public Teacher(){

    }
    public Teacher(String name,int age,String sex){
        this.name=name;
        this.age=age;
        this.sex=sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
    public void selfIntroduce(){
        System.out.println("老师的名字是"+getName()+",年龄"+getAge()+"岁,性别"+getSex());
    }
    public void giveLession(){
        System.out.println("打开课本给学生上课!");
    }
}
